diff --git a/test/py/tests/test_gpio.py b/test/py/tests/test_gpio.py
index 8c64f68..109649e 100644
--- a/test/py/tests/test_gpio.py
+++ b/test/py/tests/test_gpio.py
@@ -1,6 +1,16 @@
-# SPDX-License-Identifier: GPL-2.0+
+# SPDX-License-Identifier:  GPL-2.0+
+#
+# Copyright (c) 2021 Adarsh Babu Kalepalli <opensource.kab@gmail.com>
+# Copyright (c) 2020 Alex Kiernan <alex.kiernan@gmail.com>
 
 import pytest
+import time
+import u_boot_utils
+
+"""
+	test_gpio_input is intended to test the fix 4dbc107f4683.
+	4dbc107f4683:"cmd: gpio: Correct do_gpio() return value"
+"""
 
 @pytest.mark.boardspec('sandbox')
 @pytest.mark.buildconfigspec('cmd_gpio')
@@ -35,3 +45,166 @@
     assert(expected_response in response)
     response = u_boot_console.run_command('gpio input 200; echo rc:$?')
     assert(expected_response in response)
+
+
+"""
+Generic Tests for 'gpio' command on sandbox and real hardware.
+The below sequence of tests rely on env__gpio_dev_config for configuration values of gpio pins.
+
+ Configuration data for gpio command.
+ The  set,clear,toggle ,input and status options of 'gpio' command are verified.
+ For sake of verification,A  LED/buzzer could be connected to GPIO pins configured as O/P.
+ Logic level '1'/'0' can be applied onto GPIO pins configured as I/P
+
+
+env__gpio_dev_config = {
+        #the number of 'gpio_str_x' strings should equal to
+        #'gpio_str_count' value
+        'gpio_str_count':4 ,
+        'gpio_str_1': '0',
+        'gpio_str_2': '31',
+        'gpio_str_3': '63',
+        'gpio_str_4': '127',
+        'gpio_op_pin': '64',
+        'gpio_ip_pin_set':'65',
+        'gpio_ip_pin_clear':'66',
+        'gpio_clear_value': 'value is 0',
+        'gpio_set_value': 'value is 1',
+}
+"""
+
+
+@pytest.mark.buildconfigspec('cmd_gpio')
+def test_gpio_status_all_generic(u_boot_console):
+    """Test the 'gpio status' command.
+
+	Displays all gpio pins available on the Board.
+	To verify if the status of pins is displayed or not,
+        the user can configure (gpio_str_count) and verify existence of certain
+	pins.The details of these can be configured in 'gpio_str_n'.
+        of boardenv_* (example above).User can configure any
+        number of such pins and mention that count in 'gpio_str_count'.
+    """
+
+    f = u_boot_console.config.env.get('env__gpio_dev_config',False)
+    if not f:
+        pytest.skip("gpio not configured")
+
+    gpio_str_count = f['gpio_str_count']
+
+    #Display all the GPIO ports
+    cmd = 'gpio status -a'
+    response = u_boot_console.run_command(cmd)
+
+    for str_value in range(1,gpio_str_count + 1):
+        assert f["gpio_str_%d" %(str_value)] in response
+
+
+@pytest.mark.buildconfigspec('cmd_gpio')
+def test_gpio_set_generic(u_boot_console):
+    """Test the 'gpio set' command.
+
+	A specific gpio pin configured by user as output
+        (mentioned in gpio_op_pin) is verified for
+	'set' option
+
+    """
+
+    f = u_boot_console.config.env.get('env__gpio_dev_config',False)
+    if not f:
+        pytest.skip("gpio not configured")
+
+    gpio_pin_adr = f['gpio_op_pin'];
+    gpio_set_value = f['gpio_set_value'];
+
+
+    cmd = 'gpio set ' + gpio_pin_adr
+    response = u_boot_console.run_command(cmd)
+    good_response = gpio_set_value
+    assert good_response in response
+
+
+
+@pytest.mark.buildconfigspec('cmd_gpio')
+def test_gpio_clear_generic(u_boot_console):
+    """Test the 'gpio clear' command.
+
+	A specific gpio pin configured by user as output
+        (mentioned in gpio_op_pin) is verified for
+	'clear' option
+    """
+
+    f = u_boot_console.config.env.get('env__gpio_dev_config',False)
+    if not f:
+        pytest.skip("gpio not configured")
+
+    gpio_pin_adr = f['gpio_op_pin'];
+    gpio_clear_value = f['gpio_clear_value'];
+
+
+    cmd = 'gpio clear ' + gpio_pin_adr
+    response = u_boot_console.run_command(cmd)
+    good_response = gpio_clear_value
+    assert good_response in response
+
+
+@pytest.mark.buildconfigspec('cmd_gpio')
+def test_gpio_toggle_generic(u_boot_console):
+    """Test the 'gpio toggle' command.
+
+	A specific gpio pin configured by user as output
+        (mentioned in gpio_op_pin) is verified for
+	'toggle' option
+    """
+
+
+    f = u_boot_console.config.env.get('env__gpio_dev_config',False)
+    if not f:
+        pytest.skip("gpio not configured")
+
+    gpio_pin_adr = f['gpio_op_pin'];
+    gpio_set_value = f['gpio_set_value'];
+    gpio_clear_value = f['gpio_clear_value'];
+
+    cmd = 'gpio set ' + gpio_pin_adr
+    response = u_boot_console.run_command(cmd)
+    good_response = gpio_set_value
+    assert good_response in response
+
+    cmd = 'gpio toggle ' + gpio_pin_adr
+    response = u_boot_console.run_command(cmd)
+    good_response = gpio_clear_value
+    assert good_response in response
+
+
+@pytest.mark.buildconfigspec('cmd_gpio')
+def test_gpio_input_generic(u_boot_console):
+    """Test the 'gpio input' command.
+
+	Specific gpio pins configured by user as input
+        (mentioned in gpio_ip_pin_set and gpio_ip_pin_clear)
+	is verified for logic '1' and logic '0' states
+    """
+
+    f = u_boot_console.config.env.get('env__gpio_dev_config',False)
+    if not f:
+        pytest.skip("gpio not configured")
+
+    gpio_pin_adr = f['gpio_ip_pin_clear'];
+    gpio_clear_value = f['gpio_clear_value'];
+
+
+    cmd = 'gpio input ' + gpio_pin_adr
+    response = u_boot_console.run_command(cmd)
+    good_response = gpio_clear_value
+    assert good_response in response
+
+
+    gpio_pin_adr = f['gpio_ip_pin_set'];
+    gpio_set_value = f['gpio_set_value'];
+
+
+    cmd = 'gpio input ' + gpio_pin_adr
+    response = u_boot_console.run_command(cmd)
+    good_response = gpio_set_value
+    assert good_response in response
